<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="box">
        <div class="template" style="display:none;">
            <!-- <div class="u-con">
                <a class="avatar" href="{link}" target="_blank" data-stat="{uid}|{liveid}|{recSrc}">
                    <img src3="{pic}" alt="{alias}" uid="{uid}" />
                </a>
                <div class="info">
                    <a class="name" href="{link}" target="_blank" data-stat="{uid}|{liveid}|{recSrc}">{alias}</a>
                    <span class="num">{count}人</span>
                </div>
                <a class="i-live" href="{link}" target="_blank" data-stat="{uid}|{liveid}|{recSrc}">直播</a>
            </div>
            <div class="u-bg"></div> -->
        </div>
        <script type="text/template" class="template">
            <div class="rank2018-rich-recomm">
                <p class="richname"><a href="{richlink}" target="_blank" data-stat="{uid}|{liveid}|{recSrc}">{richalias}</a></p>
                <dl>
                    <dt class="avatar"><a href="{link}" target="_blank" data-stat="{uid}|{liveid}|{recSrc}"><img src3="{pic}" alt="{alias}" uid="{uid}"></a></dt>
                    <dd class="info">
                        <a class="name" href="{link}" target="_blank" data-stat="{uid}|{liveid}|{recSrc}">{alias}</a>
                    </dd>							
                </dl>
            </div>
        </script>
        <script type="text/template" class="template">
            <div class="rank2018-family-recomm">
                <dl>
                    <dt class="avatar"><a href="{flink}" target="_blank" data-stat="{uid}|{liveid}|{recSrc}">{fname}</a></dt>
                    <dd class="info">
                        <a class="name" href="{link}" target="_blank" data-stat="{uid}|{liveid}|{recSrc}">{alias}</a>
                        <span class="num">{count}人</span>
                    </dd>							
                </dl>
            </div>
        </script>
        <script type="text/template" class="template">
            <div class="love2019-recomm">
                <p class="richname"><a href="{richlink}" target="_blank" data-stat="{uid}|{liveid}|{recSrc}">{richalias}</a></p>
            </div>
        </script>
        <script type="text/template" class="svip-template">
            <div class="svip-recom-box"><a class="name" data-stat="{uid}|{liveid}|{recSrc}">{richalias}</a></div>
        </script>
        <script type="text/template" class="template-recom">
            <div class="recom-{eid}"><a class="name" href="{richlink}" target="_blank" data-stat="{uid}|{liveid}|{recSrc}">{richalias}</a></div>
        </script>
        <script type="text/template" class="template-star">
            <div class="recom-{eid}"><a class="name" href="{richlink}" target="_blank" data-stat="{uid}|{liveid}|{recSrc}">{richalias}</a></div>
        </script>
    </div>
    <script src="./jquery-1.11.3.min.js"></script>
    <script>
        var box = $('#box');
			var tpl = box.find('.template');
            console.log(tpl)
        function getdata(i,index){
            console.log(i);
            console.log(index == undefined ?index:'none')
            
        }
        for(var i=0;i<6;i++){
            if(i<3){
                getdata(i,i)
            }else{
                getdata(i)
            }
            
        }
    </script>
</body>
</html>